package com.wdf.project01.dao.impl;

import com.wdf.project01.dao.EmpDao;
import com.wdf.project01.pojo.Emp;
import com.wdf.project01.utils.XmlParserUtils;
import org.springframework.stereotype.Component;

import java.util.List;
@Component
public class EmpDaoA implements EmpDao {
    @Override
    public List<Emp> listEmp() {
        String file = this.getClass().getClassLoader().getResource("emp.xml").getFile();
        //System.out.println(file);
        List<Emp> empList = XmlParserUtils.parse(file,Emp.class);
        return empList;
    }
}
